using UnityEngine;

public class TutorialStepComics : TutorialBase
{
	public static string picturesPath = "Tutorial/TutorialComics/";

	public string pictureName;

	public GameObject picture;

	public bool pictureIsLoading;

	[SerializeField]
	private float timeWaitSkip = 1f;

	private Animator animator;

	private float timeFromStart;

	public override void OnStart()
	{
		TutorialManager.instance.StartLoadNextComics();
		picture.SetActive(true);
		animator = picture.GetComponent<Animator>();
		animator.SetTrigger("Start");
		EventDelegate.Add(picture.GetComponent<UIButton>().onClick, OnComplete);
		base.OnStart();
	}

	public override void OnComplete()
	{
		if (timeFromStart > timeWaitSkip)
		{
			Object.Destroy(picture);
			base.OnComplete();
		}
	}

	public override void OnUpdate()
	{
		timeFromStart += Time.deltaTime;
	}
}
